
export class HomePoster {
    id: number;
    poster_id: number = 0;
    url: string;
    router: string;

    constructor() {
    }

    getFieldTypeMap():  Map<string, string> {
        let fieldTypeMap = new Map<string, string>();
        fieldTypeMap.set('id', 'Integer');
        fieldTypeMap.set('poster_id', 'Integer');
        fieldTypeMap.set('url', 'String');
        fieldTypeMap.set('router', 'String');
        return fieldTypeMap;
    }

    getClassName(): string {
        return 'home_poster';
    }

    getPrimaryKeyList(): string[] {
        let primaryKeyList: string[] = [];
        primaryKeyList.push('id');
        return primaryKeyList;
    }

    getIndexList(): string[] {
        let indexList: string[] = [];
        indexList.push('poster_id');
        return indexList;
    }

    getEncryptedFieldList(): string[] {
        let encryptedFieldList: string[] = [];
        return encryptedFieldList;
    }

    setId(id: number): void {
        this.id = id;
    }

    getId(): number  {
        return this.id;
    }

    setPoster_id(poster_id: number): void {
        this.poster_id = poster_id;
    }

    getPoster_id(): number  {
        return this.poster_id;
    }

    setUrl(url: string): void {
        this.url = url;
    }

    getUrl(): string  {
        return this.url;
    }

    setRouter(router: string): void {
        this.router = router;
    }

    getRouter(): string  {
        return this.router;
    }

    static parseFrom(inputObject: any): HomePoster {
        let result = new HomePoster();
        if (!inputObject) {
            return result;
        }
        if (inputObject.id) {
            result.id = inputObject.id;
        }
        if (inputObject.poster_id) {
            result.poster_id = inputObject.poster_id;
        }
        if (inputObject.url) {
            result.url = inputObject.url;
        }
        if (inputObject.router) {
            result.router = inputObject.router;
        }
        return result;
    }
}
